<template>
    <div id="cert">
        <h3 class="t3-cert">防沉迷设置</h3>
        <div class="bg-input">
            <van-field v-model="userInfo.realname" center label="姓名" placeholder="请输入5-18位字母加数字" />
            <van-field v-model="userInfo.idcard" center label="身份证号" placeholder="请输入18位身份证号" />
        </div>
        <h3 class="t3-cert">支付密码设置</h3>
        <div class="bg-input">
            <van-field v-model="userInfo.password" center type="password" label="支付密码" placeholder="请输入6-15位密码" />
            <van-field v-model="userInfo.password_confirmation" center type="password" label="确认密码" placeholder="请输入6-15位密码" />
        </div>
        <div class="fixed-bottom">
            <div class="btn-1 btn-1-main" @click="submitCert()">确认</div>
        </div>
    </div>
</template>


<script>
export default {
    name: 'Cert',
    data() {
        return {
            userInfo: {
                realname: '',
                idcard: '',
                password:'',
                password_confirmation:'',
            },
        }
    },
    created() { },
    methods: {
        submitCert(){
            let params = this.userInfo;
            this.$api.user.idcard(params).then(res => {
                this.$router.push('/');
            }).finally(e => {});
        },
    }
}
</script>
